package sig.web.struts.actions;

import sig.model.entities.SigUser;
import sig.util.IServices;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class UserAction extends ActionSupport implements ModelDriven<SigUser> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private SigUser user = new SigUser();
	private IServices services;

	@Override
	public SigUser getModel() {

		return user;
	}

	
	public String execute() {

	
		return SUCCESS;
	}

	
	public String save(){
		
		services.saveUser(user);
		return SUCCESS;
	}

	public SigUser getUser() {
		return user;
	}

	public void setUser(SigUser user) {
		this.user = user;
	}

	public IServices getServices() {
		return services;
	}

	public void setServices(IServices services) {
		this.services = services;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
}
